#include "../StdInc.h"

namespace GSTrader
{
	namespace Indicator
	{
		CSeries::CSeries()
		{
			m_nStartIndex = 0;
		}

		CSeries::~CSeries()
		{
			Release();
		}

		CTimePoint CSeries::GetDateTime(uint32 nIndex)
		{
			return NULL;
		}

		double CSeries::GetMax(CTimePoint t1, CTimePoint t2)
		{
			return 0;
		}

		double CSeries::GetMax(int nStart, int nEnd, int m_bardat)
		{
			return 0;
		}

		double CSeries::GetMin(CTimePoint t1, CTimePoint t2)
		{
			return 0;
		}

		double CSeries::GetMin(int nStart, int nEnd, int bardata)
		{
			return 0;
		}

		int CSeries::GetCount()
		{
			return 0;
		}

		string CSeries::GetDescription()
		{
			return "";
		}

		string CSeries::GetName()
		{
			return "";
		}

		int CSeries::GetIndicators(const vector<CIndicator*>& vIndicator)
		{
			return 0;
		}

		void CSeries::AddIndicator(CIndicator* pIndicator)
		{
			m_lIndicator.push_back(pIndicator);
		}

		void CSeries::RemoveIndicator(CIndicator* pIndicator)
		{
			m_lIndicator.remove(pIndicator);
		}

		double CSeries::operator[](int nIndex)
		{
			return GetValueByIndex(nIndex);
		}

		double CSeries::At(int nIndex)
		{
			return GetValueByIndex(nIndex);
		}

		double CSeries::GetValueByIndex(int index)
		{
			return 0;
		}

		double CSeries::GetValue(int index, int bardata)
		{
			return 0;
		}

		double CSeries::GetFirstValue()
		{
			return 0;
		}
		double CSeries::GetLastValue()
		{
			return 0;
		}

		CTimePoint CSeries::GetLastDateTime()
		{
			return NULL;
		}

		CTimePoint CSeries::GetFirstDateTime()
		{
			return NULL;
		}

		int CSeries::GetIndex(CTimePoint dateTime, SeriesSearchOption option /* = SeriesSearchOption::ssoPrev */)
		{
			return 0;
		}

		int CSeries::GetIndex(CTimePoint dateTime, SeriesIndexOption option/* =SeriesIndexOption::sioNull */)
		{
			return 0;
		}

		void CSeries::Release()
		{
			for (auto it : m_lIndicator)
			{
				_delete(it)
			}

			m_lIndicator.clear();
		}

		CSeries::CSeries(const CSeries& series)
		{
			if (this == &series)
				return;

			m_nStartIndex = series.m_nStartIndex;
			m_strname = series.m_strname;
			m_strDescription = series.m_strDescription;
		}

		CSeries& CSeries::operator=(const CSeries& Series)
		{
			if (this == &Series)
				return *this;

			m_nStartIndex = Series.m_nStartIndex;
			m_strname = Series.m_strname;
			m_strDescription = Series.m_strDescription;

			return *this; 
		}

	}
}